{extend name="layout/layout" /}

{block name="content"}
<div class="row">
    <div class="col-md-12">
        <div class="portlet light">
            <div class="portlet-title">
                <div class="caption">
                    <i class="icon-share font-dark"></i>
                    <span class="caption-subject font-dark bold uppercase"> 社区设置</span>
                </div>
                <div class="actions">
                    <a class="btn btn-circle btn-icon-only btn-default fullscreen" href="javascript:;" data-original-title="" title=""> </a>
                </div>
            </div>
            <div class="portlet-body">
                <form class="form-horizontal" method="post" enctype="multipart/form-data">
                    <div class="form-body">
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        非村民是否允许评论
                                    </label>
                                    {if condition="$config == '' || $config['pinglunoff'] == 0"}
                                    <div class="col-md-9">
                                        <div class="mt-radio-inline">
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="pinglunoff" value="0" placeholder="" checked="">
                                                否
                                                <span></span>
                                            </label>
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="pinglunoff" value="1" placeholder="">
                                                是
                                                <span></span>
                                            </label>
                                        </div>
                                    </div>
                                    {else /}
                                    <div class="col-md-9">
                                        <div class="mt-radio-inline">
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="pinglunoff" value="0" placeholder="">
                                                否
                                                <span></span>
                                            </label>
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="pinglunoff" value="1" placeholder="" checked="">
                                                是
                                                <span></span>
                                            </label>
                                        </div>
                                    </div>
                                    {/if}
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        非村民是否允许发布动态
                                    </label>
                                    {if condition="$config == '' || $config['dongtaioff'] == 0"}
                                    <div class="col-md-9">
                                        <div class="mt-radio-inline">
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="dongtaioff" value="0" placeholder="" checked="">
                                                否
                                                <span></span>
                                            </label>
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="dongtaioff" value="1" placeholder="">
                                                是
                                                <span></span>
                                            </label>
                                        </div>
                                    </div>
                                    {else /}
                                    <div class="col-md-9">
                                        <div class="mt-radio-inline">
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="dongtaioff" value="0" placeholder="">
                                                否
                                                <span></span>
                                            </label>
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="dongtaioff" value="1" placeholder="" checked="">
                                                是
                                                <span></span>
                                            </label>
                                        </div>
                                    </div>
                                    {/if}
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        发布动态是否需要审核
                                    </label>
                                    <div class="col-md-9">
                                        <div class="mt-radio-inline">
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="dongtaicheckoff" value="0" placeholder="" {if condition="$config == '' || $config['dongtaicheckoff'] == 0"}checked="checked"{/if} >
                                                否
                                                <span></span>
                                            </label>
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="dongtaicheckoff" value="1" placeholder="" {if condition="$config && $config['dongtaicheckoff'] == 1"}checked="checked"{/if} >
                                                是
                                                <span></span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <input type="hidden" name="townId" value="{$townId}" />

                        <hr />
                        <div class="row">
                            <div class="form-actions">
                                <div class="col-md-offset-2 col-md-10">
                                    <button type="button" id="form-submit" class="btn blue save-btn">
                                        保存 <i class="fa fa-floppy-o"></i>
                                    </button>
                                    <button type="button" class="btn default" onclick="history.go(-1);">
                                        返回 <i class="fa fa-mail-forward"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="pagescript"}
<script>
    var posturl = "{:url('admin/'.strtolower($model).'/configpost')}";
</script>
<script src="__STATIC__/admin/pages/js/townconfig.js" type="text/javascript"></script>
{/block}